#if _MSC_VER
 #pragma once
#endif // _MSC_VER

#ifndef __HERZELEID_BASICSHAPES_INCLUDED__
 #define __HERZELEID_BASICSHAPES_INCLUDED__
 #include "HerzeleidRendererModelResources.hxx"
 #include "HerzeleidCoreRenderer3.hxx"
 #include "HerzeleidTangentVertex.hxx"
 #include "HerzeleidBasicVertex.hxx"

 #ifdef HERZELEID_DESKTOP
  #define ref
  #define internal public
 #else
 #endif


// A helper class that provides convenient functions for creating common geometrical shapes.
HerzeleidRendererResourcesNamespaceBegin ref class BasicShapes
{
	typedef HerzeleidRendererCoreNamespaceImpl::Device3 Device3;
	TinyTypeDecl( Device3 );

private:
    Microsoft::WRL::ComPtr<Device3> m_Device; // Device to use 

    Void CreateVertexBuffer(
        _In_ UInt32 uiNumVertices,
        _In_ BasicVertexPtr pVertexData,
        _Out_ BufferAddress ppVertexBuffer
        );

    Void CreateTangentVertexBuffer(
        _In_ UInt32 uiNumVertices,
        _In_ TangentVertexPtr pVertexData,
        _Out_ BufferAddress ppVertexBuffer
        );

    Void CreateIndexBuffer(
        _In_ UInt32 uiNumVertices,
        _In_ UInt16Ptr indexData,
        _Out_ BufferAddress ppIndexBuffer
        );

internal:

	BasicShapes( 
		_In_ Device3Ptr pDevice 
		);

    Void CreateCube(
        _Out_ BufferAddress ppVertexBuffer,
        _Out_ BufferAddress ppIndexBuffer,
        _Out_opt_ UInt32Ptr uiVertexCount,
        _Out_opt_ UInt32Ptr uiVndexCount
		);
    Void CreateBox(
        _In_ DirectX::XMFLOAT3 Radii,
        _Out_ BufferAddress ppVertexBuffer,
        _Out_ BufferAddress ppIndexBuffer,
        _Out_opt_ UInt32Ptr uiVertexCount,
        _Out_opt_ UInt32Ptr uiVndexCount
        );
    Void CreateSphere(
        _Out_ BufferAddress ppVertexBuffer,
        _Out_ BufferAddress ppIndexBuffer,
        _Out_opt_ UInt32Ptr uiVertexCount,
        _Out_opt_ UInt32Ptr uiVndexCount
        );
    Void CreateTangentSphere(
        _Out_ BufferAddress ppVertexBuffer,
        _Out_ BufferAddress ppIndexBuffer,
        _Out_opt_ UInt32Ptr uiVertexCount,
        _Out_opt_ UInt32Ptr uiVndexCount
        );
    Void CreateReferenceAxis(
        _Out_ BufferAddress ppVertexBuffer,
        _Out_ BufferAddress ppIndexBuffer,
        _Out_opt_ UInt32Ptr uiVertexCount,
        _Out_opt_ UInt32Ptr uiVndexCount
        );

} HerzeleidRendererResourcesNamespaceEnd;

#ifdef HERZELEID_DESKTOP
#undef ref
#undef internal
#else
#endif

#endif // !HERZELEID_BASICSHAPES_INCLUDED__
